﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CarShop
{
    class Jeep : Vehicle
    {
        //fields
        private Engine jeepEngine;
        private Transmission transmission;
        private double jeepWeight;
        private List<string> description = new List<string>();

        //constructor
        public Jeep(string brand, string model, string color, int year, int speed, int price, Engine jeepEngine, Transmission transmission, double jeepWeight)
            : base(brand, model, color, year, speed, price)
        {
            this.jeepEngine = jeepEngine;
            this.transmission = transmission;
            this.jeepWeight = jeepWeight;
        }

        public Transmission Transmission
        {
            get
            {
                return this.transmission;
            }
            set
            {
                this.transmission = value;
            }
        }


        public Engine JeepEngine
        {
            get
            {
                return this.jeepEngine;
            }
            set
            {
                this.jeepEngine = value;
            }
        }

        public List<string> Description
        {
            get { return description; }
            set
            {
                this.description = value;
            }
        }
        public void AddComment(string extra)
        {
            this.description.Add(extra);
        }

        public override string AdditionalInfo()
        {
            StringBuilder someJeep = new StringBuilder();
            someJeep.AppendLine("Transmission: " + this.Transmission.ToString());
            someJeep.AppendLine("Jeep weight: : " + this.jeepWeight);
            return someJeep.ToString();
        }
    }
}
